A storage is computer-readable media capable of storing data in blocks. Storages face a myriad of threats to the data they store and to their smooth and continuous operation. In order to mitigate these threats, a backup of the data in a storage may be created at a particular point in time to enable the restoration of the data at some future time. Such a restoration may become desirable, for example, if the storage experiences corruption of its stored data, if the storage becomes unavailable, or if a user wishes to create a second identical storage.
A storage is typically logically divided into a finite number of fixed-length blocks. A storage also typically includes a file system which tracks the locations of the blocks that are allocated to each file that is stored in the storage. The file system also tracks the blocks that are not allocated to any file. The file system generally tracks allocated and unallocated blocks using specialized data structures, referred to as file system metadata. File system metadata is also stored in designated blocks in the storage.
Various techniques exist for backing up a source storage. One common technique involves backing up individual files stored in the source storage on a per-file basis. This technique is often referred to as file backup. File backup uses the file system of the source storage as a starting point and performs a backup by writing the files to a backup storage. Using this approach, individual files are backed up if they have been modified since the previous backup. File backup may be useful for finding and restoring a few lost or corrupted files. However, file backup may also include significant overhead in the form of bandwidth and logical overhead because file backup requires the tracking and storing of information about where each file exists within the file system of the source storage and the backup storage.
Another common technique for backing up a source storage ignores the locations of individual files stored in the source storage and instead simply backs up all allocated blocks stored in the source storage. This technique is often referred to as image backup because the backup generally contains or represents an image, or copy, of the entire allocated contents of the source storage. Using this approach, individual allocated blocks are backed up if they have been modified since the previous backup. Because image backup backs up all allocated blocks of the source storage, image backup backs up both the blocks that make up the files stored in the source storage as well as the blocks that make up the file system metadata. Also, because image backup backs up all allocated blocks rather than individual files, this approach does not necessarily need to be aware of the file system metadata or the files stored in the source storage, beyond utilizing minimal knowledge of the file system metadata in order to only back up allocated blocks since unallocated blocks are not generally backed up.
An image backup can be relatively fast compared to file backup because reliance on the file system is minimized. An image backup can also be relatively fast compared to a file backup because seeking is reduced. In particular, during an image backup, blocks are generally read sequentially with relatively limited seeking. In contrast, during a file backup, blocks that make up individual files may be scattered, resulting in relatively extensive seeking.
One way to accomplish image backup is using snapshot technology, which enables the state of the source storage at a particular point in time (also known as the “snapshot time”) to be captured without interrupting other processes, thus avoiding downtime of the source storage. Many snapshot technologies employ a “copy on write” methodology which requires that every write command, received by the file system of the source storage during a snapshot operation, be delayed until the original data block at the location targeted by the write command is copied for safekeeping to a new location. In this manner, the copied original blocks stored in the new location, as well as the unchanged original blocks stored in the source storage, are “frozen” at the snapshot time, which enables an image backup of the frozen data blocks to be created. Then, once the backup has been created, the snapshot operation can be discontinued and the data blocks that were copied for safekeeping to the new location can be discarded.
A source storage may be initially backed up using a snapshot operation to create a base backup and then incremental backups of the source storage may be created using successive snapshot operations. A new incremental backup may include only those blocks of the source storage that were changed subsequent to the previous snapshot time but prior to the most recent snapshot time. In order to easily back up only changed blocks during the creation of an incremental backup, it can be useful to incrementally track which blocks are changed between a previous snapshot time and a most recent snapshot time instead of determining which blocks are changed by performing a full compare of every block in the source storage with corresponding blocks in base and incremental backups that were previously created.
One common problem that is encountered during successive image backup operations is the difficulty of reliably tracking incremental changes prior to the creation of each incremental backup. For example, incremental changes are typically tracked in volatile memory between the two relevant snapshot times. For incremental change tracking to be reliable, the change tracking must guarantee that all changes to blocks between two snapshot times are recorded. However, because the timing of change tracking and the timing of snapshot operations can be difficult to coordinate, there is a risk that the incremental change tracking will be incomplete, which can result in an incomplete incremental image backup and loss of data.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one example technology area where some embodiments described herein may be practiced.